package cn.itcast.order.service;

import cn.itcast.order.pojo.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

@Service
public interface OrderService extends IService<Order> {

    /**
     * 创建订单
     *
     * @param order
     * @return 订单id
     */
    Long create(Order order);

    Order queryOrderById(Long orderId);

    Boolean insertOrder(Order order);

    /**
     * 正常更新一个订单
     * 将订单状态进行流转
     * @param order
     * @return
     */
    public Boolean updateOrderState(Order order);
}
